import request from '@/utils/request'

// 查询商品采购列表
export function listStock(query) {
  return request({
    url: '/ybUpload/entryStock/list',
    method: 'get',
    params: query
  })
}

// 查询商品采购详细
export function getStock(id) {
  return request({
    url: '/ybUpload/entryStock/' + id,
    method: 'get'
  })
}

// 新增商品采购
export function addStock(data) {
  return request({
    url: '/ybUpload/entryStock',
    method: 'post',
    data: data
  })
}

// 修改商品采购
export function updateStock(data) {
  return request({
    url: '/ybUpload/entryStock',
    method: 'put',
    data: data
  })
}

// 删除商品采购
export function delStock(id) {
  return request({
    url: '/ybUpload/entryStock/' + id,
    method: 'delete'
  })
}